package com.factory.absfactory.order;

import com.factory.absfactory.pizza.BjPepperPizza;
import com.factory.absfactory.pizza.Pizza;

/**
 * @author zhupanlin
 * @version 1.0
 * @description: TODO
 * @date 2024/4/13 12:41
 */
// 抽象工厂实现类
public class BjFactory implements AbsFactory{


    @Override
    public Pizza createPizza(String orderType) {
        System.out.println("使用抽象工厂模式");
        Pizza pizza = null;
        if ("cheese".equals(orderType)){
            pizza = new BjPepperPizza();
        }else if ("pepper".equals(orderType)){
            pizza = new BjPepperPizza();
        }
        return pizza;
    }
}
